package com.huc.rabbit.mq.provider;

import com.huc.rabbit.mq.config.RabbitPublishSubscribeConfig;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class PushSubMessageProvider {

    @Autowired
    private AmqpTemplate amqpTemplate;

    public void send(String msg){
        amqpTemplate.convertAndSend(RabbitPublishSubscribeConfig.EXCHANGE_NAME,"",msg);
    }

}
